//C++怎么把任意文本文件include成全局字符数组？参考：https://www.zhihu.com/question/431645051/answer/1594920485

#include <iostream>

#define EMBED_STR(name, path)                \
  extern const char name[];                  \
  asm(".section .rodata, \"a\", @progbits\n" \
      #name ":\n"                            \
      ".incbin \"" path "\"\n"               \
      ".byte 0\n"                            \
      ".previous\n");

EMBED_STR(kCurSourceFile, "example.cpp");

int main() {
  std::cout << kCurSourceFile;
  return 0;
}
